<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script src="https://unpkg.com/vue@next"></script>
<div id="app">{{fullName}}</div>
<script>
    const vueOpt = {
        data(){
            return{
                firstName: 'Kenny',
                lastName: 'Bai',
                fullName: 'Kenny Bai'
            }
        },
        watch:{
            firstName(val){
                this.fullName = val + ' ' + this.lastName;
            },
            lastName(val){
                this.fullName = this.firstName + ' ' + val;
            }
        }
    }

    const vm = Vue.createApp(vueOpt).mount('#app');

    setTimeout(()=>{
        vm.$data.firstName = 'ayi';
    }, 1000)
</script>
</body>
</html>
